package java67_adv9;

import java.net.*;
import java.io.*;

public class ClientTest {// 47.93.151.29
	public static void main(String[] args) throws IOException {
		// Socket s = new Socket("192.168.1.146", 9999);
		Socket s = new Socket("47.93.151.29", 9999);
		InputStream in = s.getInputStream();
		OutputStream out = s.getOutputStream();
		BufferedReader br = new BufferedReader(new InputStreamReader(in));
		PrintWriter pw = new PrintWriter(out);
		pw.println("今天是个好日子,晚上有半月食");
		pw.flush();
		String reply = br.readLine();
		System.out.println("服务器说:" + reply);
		s.close();
	}
}
